<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>我的积分</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <!--标准mui.css-->
    <link rel="stylesheet" href="${base!}/assets/front/h5/css/mui.min.css" />
    <link rel="stylesheet" type="text/css" href="${base!}/assets/front/h5/css/icons-extra.css" />
    <link rel="stylesheet" href="${base!}/assets/front/h5/css/hryc.css" />
    <link rel="stylesheet" href="${base!}/assets/front/newH5/css/index.css?v=${@date.getDateTime()}" />
    <!--App自定义的css-->
    <!--<link rel="stylesheet" type="text/css" href="../css/app.css"/>-->
</head>
<body>


<header class="mui-bar mui-bar-nav top-color">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: white;"></a>
    <h1 class="mui-title" style="color: white;">我的积分</h1>
</header>

<div class="mui-content" style="background: white;" id="vue" v-cloak>
    <div style="text-align: center;margin-top: 20px;color: #333333;font-size: 16px;">累计积分：{{integrals.useAbleIntegral}}</div>
    <ul class="mui-table-view nobd" style="padding: 10px;">
        <li class="mui-table-view-cell mui-media"  v-for="item in integrals.details" :key="item.id"
            style="background-color:rgb(56, 206, 204);margin-top: 10px; border-radius:5px;">
            <div class="list_head"><span>{{item.integralDesc}}</span>
                <span style="margin-left: 60%;" v-if="item.integralType==1">+{{item.addIntegral}}</span>
                <span style="margin-left: 60%;" v-if="item.integralType==2">+{{item.addIntegral}}</span>
                <span style="margin-left: 60%;" v-if="item.integralType==3">+{{item.addIntegral}}</span>
                <span style="margin-left: 60%;" v-if="item.integralType==4">-{{item.addIntegral}}</span>
                <span style="margin-left: 60%;" v-if="item.integralType==5">+{{item.addIntegral}}</span>
            </div>
            <div class="list_des">{{item.integralTime}}</div>
        </li>
    </ul>
</div>
<script type="text/javascript" src="${base!}/assets/front/h5/js/mui.js" ></script>
<script type="text/javascript" src="${base!}/assets/front/h5/js/vue.js" ></script>
<script type="text/javascript" src="${base!}/assets/front/h5/js/jquery-2.0.0.min.js" ></script>
<script type="application/javascript">
    mui.init({
        swipeBack:true //启用右滑关闭功能
    });

    var vue = new Vue({
        el: '#vue',
        data: {
            integrals: [],
        },
        created:function () {   //实例初始化创建完成执行

            this.getIntegral()     //调用自身方法

        },
        methods:{              //定义封装方法
            //获取列表
            getIntegral:function () {
                var self = this;
                $.ajax({
                    type:"POST",
                    url:"${base!}/open/h5/integral/getIntegral.html",
                    dataType:"JSON",
                    data:{

                    },
                    success:function(data){
                        if (data.code == 0) {
                            var d = data.data;
                            self.integrals = d;
                        } else {

                        }
                    }
                });

            }
        },
        watch:{     //监听器
            // carModel:function () {
            //     this.getProvince();
            // }
        }

    })

</script>
</body>
</html>
